<template>
  <el-form-item label="ID">
    <el-input v-model="selectedOptions.name" disabled />
  </el-form-item>
  <el-form-item label="name">
    <el-input v-model="selectedWidget.name" disabled />
  </el-form-item>
  <el-form-item label="Radio单选框字段标签">
    <el-input v-model="selectedOptions.radioText" />
  </el-form-item>
  <el-form-item label="单选框的尺寸">
    <el-select v-model="selectedOptions.size" placeholder="Select">
      <el-option
        v-for="item in sizeOptions"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      />
    </el-select>
  </el-form-item>
  <el-form-item label="显示样式">
    <el-radio-group v-model="displayStyle" class="ml-4">
      <el-radio value="iniline" size="large">行内</el-radio>
      <el-radio value="block" size="large">块</el-radio>
    </el-radio-group>
  </el-form-item>
  <el-form-item label="显示为按钮">
    <el-switch v-model="selectedOptions.buttonStyle" />
  </el-form-item>
  <el-form-item label="是否禁用单选框">
    <el-switch v-model="selectedOptions.disabled" />
  </el-form-item>
  <el-form-item label="是否显示边框">
    <el-switch v-model="selectedOptions.border" />
  </el-form-item>

  <el-form-item label="按钮形式的 Radio 激活时的文本颜色">
    <el-input v-model="selectedOptions.textColor" />
  </el-form-item>
  <el-form-item label="按钮形式的 Radio 激活时的填充色和边框色">
    <el-input v-model="selectedOptions.fill" />
  </el-form-item>

  <el-form-item label="输入时是否触发表单的校验">
    <el-switch v-model="selectedOptions.validateEvent" />
  </el-form-item>
</template>

<script setup>
import {ref} from 'vue'
defineOptions({
  name: "singleinputAttribute",
  inheritAttrs: false,
});
let $props = defineProps({
  selectedWidget: {
    type: Object,
    required: true,
  },
  selectedOptions: {
    type: Object,
    required: true,
  },
});
let displayStyle = ref("iniline");
let sizeOptions = [
  {
    value: "large",
    label: "large",
  },
  {
    value: "default",
    label: "default",
  },
  {
    value: "small",
    label: "small",
  },
];

</script>

<style lang="scss" scoped></style>
